
<?php
function convertRssPubDate ($rssPubDate,$format){
	switch ($format) {
	    case "php":
	        $date = convertToPhp($rssPubDate);
	        break;
	    case "sql":
	         $date = convertToSql($rssPubDate);
	        break;
	}
	
	return ($date);
}


function convertToPhp ($rssPubDate){
	//$date = strftime("%Y-%m-%d %H:%M:%S", strtotime($rssPubDate));
	$date = strftime("%d-%m-%Y %H:%M", strtotime($rssPubDate));
	return $date;
}

function convertToSql ($rssPubDate){
	$date = date('Y-m-d H:i:s', strtotime($rssPubDate));
	return $date;
}


?>
